Automated rule checking of projects
Neuron Power Engineer provides a tool for automated rule checking for a Neuron Power Engineer project or for some objects of a Neuron Power Engineer project. This tool is also known as model ruler checker or as a possibility to validate an application.
Good to know |
---|
The tool is intended for usage by an experienced user of Neuron Power Engineer. A condition for the successful usage of the tool is the knowledge of the action to be executed as it would be executed in the graphical user interface of Neuron Power Engineer. The output of the tool is in English only. |
In this article: |
---|
Preparation
-
Make sure that Neuron Power Engineer is installed. Have the following information prepared:
-
The path to the Neuron Power Engineer installation directory
-
The path to a directory that will be used as the workspace
In case the directory does not exist, the tool creates it. If the optional parameter-checkEmptyWorkspace
is used (see the description of this parameter below), the directory must be empty. -
The path to the project that should be checked.
-
Optional: the name to the folder/object or resource/library that should be checked.
-
The path to the log configuration file (see below for more information)
A sample configuration file is included in the installation of Neuron Power Engineer.
-
-
Make sure that the rules are accordingly configured in the properties of the project. Details: See "Changing the configuration of rules".
-
Open a command line: e.g.
cmd.exe
under Windows and navigate to the Neuron Power Engineer installation directory.
Invocation
|
Invoking the tool under Linux is not officially supported. However, if you want to try invoking the tool under Linux nevertheless, replace the part NeuronPowerEngineerc --launcher.ini NeuronPowerEngineer.ini -application
of the above-mentioned invocation by NeuronPowerEngineer -application
. The remaining part of the invocation is identical to the above-mentioned invocation.
Description of parameters:
Parameter |
Description |
Example |
---|---|---|
|
absolute path to the project If the tool is invoked for a project, the corresponding objects of the project are examined based on rules according to the configuration for the project. |
|
|
name of the folder/object within the project for which the validation should be executed, meaning a project-relative path It is possible to specify the following objects as parameter:
|
for a folder: |
|
absolute path to a workspace to which the project should be imported
|
|
|
absolute or relative path where the report file should be created |
|
|
file name of the generated report |
|
|
path to the log configuration file |
|
|
Example 1 for invocation, validating the objects of a project with the check whether the workspace is empty |
---|
|
Example 2 for invocation, validating the objects of a project just specifying the project name because the project has already been imported into the workspace |
---|
|
Example 3 for invocation, just validating the objects within a specified project folder and redirecting the generated report |
---|
|
Log configuration file
This file is needed to configure the log4j logging mechanism. The file specifies how log events are output.
Sample log configuration file |
---|
|
Result
A report is generated with the file extension .mrclog
in the project folder. Details on the report: See "Results of examination in Validate view" and heading "Report for validation".
Troubleshooting
The file that is specified in the log configuration file contains information about the rule check. If the rule check has not been successful, fix the problem according to the following table.
Return code |
Message on STDOUT or STDERR |
Cause |
Solution |
---|---|---|---|
|
|
|
|
|
|
An argument or parameter is missing. |
Invoke the tool as specified above. |
|
|
The specified project does not exist. |
Specify an existing project. Or invoke the tool with the absolute path for the project. |
|
|
The workspace already contains data (e.g. one or more Neuron Power Engineer projects). |
Use an empty workspace or remove all existing data from the current one. |
|
|
The specified object does not exist. |
Specify an existing object. Or invoke the tool without the parameter |
|
|
An unexpected error has occurred. |
Contact Neuron. |